<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/MvcViewPage.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<SMO.Models.Stock>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	TableOfStockPrice
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <link href="../../Content/MarketStatistics/StockPrice.css" rel="stylesheet" type="text/css" />
    <h2>TableOfStockPrice</h2>

    <form id="form1" runat="server">  
    <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True">
            <asp:ListItem Value="1">HOSE</asp:ListItem>
            <asp:ListItem Value="0">HASTC</asp:ListItem>
        </asp:DropDownList>    
    <br />
    <br />
    
        <div id="stockPrice_StockPriceHeader">    
                <div class="stockPrice_LabelStockSymbol"><asp:Label ID="Label1" runat="server" Text="StockSymbol" ></asp:Label></div>
                <div class="stockPrice_LabelCompanyName"><asp:Label ID="Label2" runat="server" Text="CompanyName"></asp:Label></div>
                <div class="stockPrice_LabelPrice"><asp:Label ID="Label3" runat="server" Text="Price"></asp:Label></div>
                <div class="stockPrice_LabelLastPrice"><asp:Label ID="Label4" runat="server" Text="AvgPrice"></asp:Label></div>
                <div class="stockPrice_LabelLevel"><asp:Label ID="Label5" runat="server" Text="TypeSTC"></asp:Label></div>          
        </div>
    <% 
        int i = 1;
        foreach (var item in Model)
        {
            if (i == 1)
            { 
    %>    
        <div id="stockPrice_StockPriceItemRow">
                <div class="stockPrice_LabelStockSymbol"><%= Html.Encode(item.StockSymbol)%></div>
                <div class="stockPrice_LabelCompanyName"><%= Html.Encode(item.CompanyName)%></div>
                <div class="stockPrice_LabelPrice"> <%= Html.Encode(String.Format("{0:F}", item.Price))%></div>
                <div class="stockPrice_LabelLastPrice"><%= Html.Encode(String.Format("{0:F}", item.AvgPrice))%></div>
                <div class="stockPrice_LabelLevel"><%= Html.Encode(item.TypeSTC)%></div>            
            </div>
    <%
        i = 0;
            }
            else
            {
    %>
            <div id="stockPrice_StockPriceAlterRow">
                <div class="stockPrice_LabelStockSymbol"><%= Html.Encode(item.StockSymbol)%></div>
                <div class="stockPrice_LabelCompanyName"><%= Html.Encode(item.CompanyName)%></div>
                <div class="stockPrice_LabelPrice"> <%= Html.Encode(String.Format("{0:F}", item.Price))%></div>
                <div class="stockPrice_LabelLastPrice"><%= Html.Encode(String.Format("{0:F}", item.AvgPrice))%></div>
                <div class="stockPrice_LabelLevel"><%= Html.Encode(item.TypeSTC)%></div>            
            </div>
    <%
        i = 1;
            }
        }            
    %>

    
</form>


</asp:Content>

